<!--
 * @Author: your name
 * @Date: 2022-03-12 23:07:18
 * @LastEditTime: 2022-03-12 23:08:18
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \算法测试\day0906\剪贴板.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        async function GetText() {
            const result = await navigator.permissions.query({ name: "clipboard-read" });

            // 获取剪贴板内容
            const text = await navigator.clipboard.readText();
            console.log(result, text);
        }
        GetText();
    </script>
</body>

</html>